home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.5 KB | 49 lines | [TEXT/GEOL] |
- Item 9118910 4-May-89 09:25
-
- From: KNEPPER Knepper, Christopher
-
- To: CH0095 CH DEV PEMD Group
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Response to Later versions of
-
- Hi Ernie,
-
- >How can any of these constants be increased so that the application can read
- >files created when the constants were smaller?
-
- Why not include a data file version number as the first byte of the data file?
- This way, your DoRead method could check the first byte (ie the version number)
- of the data file and determine which data structure to use when reading data
- from the file based on the version number of the data file.
-
- If the version number (byte) were 1, you would use your original data
- structure, if the version number (byte) were 2, you would use the next
- version's data structure.
-
- In this mechanism, you would need to include the original code for DoRead (and
- the original constants) as well as include all subsequent versions' code for
- DoRead (and their constants).
-
- You might redefine your constants as:
-
- kMaxVariablenameLength {original constant value}
-
- k2MaxVariablenameLength {2nd version constant value}
-
- k3MaxVariablenameLength {3rd version constant value}
-
- etc.
-
- ourApp would have _all_ the constants for each version of the data file, rather
- than just the latest and greates values.
-
- This is roughly similar to the way in which PICT files version numbering works.
-
- Good luck,
- -Chris
- (another faceless dweeb)
-
-
-